package com.d0313;

public class Person {
    protected String name;
    protected String address;
    protected char sex;
    protected int age;
    public Person(){

    }
    public Person(String name,String address,char sex,int age){
        this.name=name;
        this.address=address;
        this.sex=sex;
        this.age=age;
    }
    void print(){
        System.out.println("name="+name);
        System.out.println("address="+address);
        System.out.println("sex="+sex);
        System.out.println("age="+age);
    }

    public static void main(String[] args) {
        Person person=new Person("Lucy","河北省承德市",'女',22);
        person.print();
        Student student=new Student(85,90,"Jack","河北省承德市",'男',20);
        student.print();

    }
}
class Student extends Person {
    double math;
    double english;

    public Student(double math, double english, String name, String address, char sex, int age) {
        this.name=name;
        this.address=address;
        this.sex=sex;
        this.age=age;
        this.math = math;
        this.english = english;
    }

    public Student(double math,double english){
        this.english=english;
        this.math=math;

    }
    public Student(){

    }

    @Override
    void print() {
        System.out.println("name="+name);
        System.out.println("address="+address);
        System.out.println("sex="+sex);
        System.out.println("age="+age);
        System.out.println("math="+math);
        System.out.println("English="+english);
    }
}
